# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnet
pkgver=1.2
pkgrel=0
pkgdesc="A generic networking API that provides access to several protocols."
url="https://sourceforge.net/projects/libnet-dev/"
arch="all"
license="BSD-2-Clause"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://github.com/libnet/libnet/releases/download/v$pkgver/libnet-$pkgver.tar.gz
	fix-types.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-link-layer=linux
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="84430f24e000eb7728b1fbb5e620716d13d193e8b9e024cf56a08fbeeeaaf56c9122caaf7647f01e6b38b73212e592fa5cc4e8ff56b1d5f5a73aea462e84edd6  libnet-1.2.tar.gz
1c32c8fe62b04546550f4d961fdb4abf10a1faef8f76def691fb6c57dccb7166b5dc0b8c007b99e0d95138fce4be92c2bc72a618c6b8b7c5149bf04192aaece7  fix-types.patch"
